package com.gmail.blackdog1987.onedollar.entity;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.Id;

/**
 * Created by dongguochao on 12/24/15.
 */
@Entity
@javax.persistence.Table(name = "t_wxpay_callback", schema = "", catalog = "onedollar")
public class TWxpayCallbackEntity {
    private int id;

    @Id
    @javax.persistence.Column(name = "id", nullable = false, insertable = true, updatable = true)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    private String returnCode;

    @Basic
    @javax.persistence.Column(name = "return_code", nullable = true, insertable = true, updatable = true, length = 16)
    public String getReturnCode() {
        return returnCode;
    }

    public void setReturnCode(String returnCode) {
        this.returnCode = returnCode;
    }

    private String returnMsg;

    @Basic
    @javax.persistence.Column(name = "return_msg", nullable = true, insertable = true, updatable = true, length = 128)
    public String getReturnMsg() {
        return returnMsg;
    }

    public void setReturnMsg(String returnMsg) {
        this.returnMsg = returnMsg;
    }

    private String appid;

    @Basic
    @javax.persistence.Column(name = "appid", nullable = true, insertable = true, updatable = true, length = 32)
    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    private String mchId;

    @Basic
    @javax.persistence.Column(name = "mch_id", nullable = true, insertable = true, updatable = true, length = 32)
    public String getMchId() {
        return mchId;
    }

    public void setMchId(String mchId) {
        this.mchId = mchId;
    }

    private String deviceInfo;

    @Basic
    @javax.persistence.Column(name = "device_info", nullable = true, insertable = true, updatable = true, length = 32)
    public String getDeviceInfo() {
        return deviceInfo;
    }

    public void setDeviceInfo(String deviceInfo) {
        this.deviceInfo = deviceInfo;
    }

    private String nonceStr;

    @Basic
    @javax.persistence.Column(name = "nonce_str", nullable = true, insertable = true, updatable = true, length = 32)
    public String getNonceStr() {
        return nonceStr;
    }

    public void setNonceStr(String nonceStr) {
        this.nonceStr = nonceStr;
    }

    private String sign;

    @Basic
    @javax.persistence.Column(name = "sign", nullable = true, insertable = true, updatable = true, length = 16)
    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    private String resultCode;

    @Basic
    @javax.persistence.Column(name = "result_code", nullable = true, insertable = true, updatable = true, length = 16)
    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    private String errCode;

    @Basic
    @javax.persistence.Column(name = "err_code", nullable = true, insertable = true, updatable = true, length = 32)
    public String getErrCode() {
        return errCode;
    }

    public void setErrCode(String errCode) {
        this.errCode = errCode;
    }

    private String errCodeDes;

    @Basic
    @javax.persistence.Column(name = "err_code_des", nullable = true, insertable = true, updatable = true, length = 128)
    public String getErrCodeDes() {
        return errCodeDes;
    }

    public void setErrCodeDes(String errCodeDes) {
        this.errCodeDes = errCodeDes;
    }

    private String openid;

    @Basic
    @javax.persistence.Column(name = "openid", nullable = true, insertable = true, updatable = true, length = 128)
    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    private String isSubscribe;

    @Basic
    @javax.persistence.Column(name = "is_subscribe", nullable = true, insertable = true, updatable = true, length = 1)
    public String getIsSubscribe() {
        return isSubscribe;
    }

    public void setIsSubscribe(String isSubscribe) {
        this.isSubscribe = isSubscribe;
    }

    private String tradeType;

    @Basic
    @javax.persistence.Column(name = "trade_type", nullable = true, insertable = true, updatable = true, length = 16)
    public String getTradeType() {
        return tradeType;
    }

    public void setTradeType(String tradeType) {
        this.tradeType = tradeType;
    }

    private String bankType;

    @Basic
    @javax.persistence.Column(name = "bank_type", nullable = true, insertable = true, updatable = true, length = 16)
    public String getBankType() {
        return bankType;
    }

    public void setBankType(String bankType) {
        this.bankType = bankType;
    }

    private Integer totalFee;

    @Basic
    @javax.persistence.Column(name = "total_fee", nullable = true, insertable = true, updatable = true)
    public Integer getTotalFee() {
        return totalFee;
    }

    public void setTotalFee(Integer totalFee) {
        this.totalFee = totalFee;
    }

    private String feeType;

    @Basic
    @javax.persistence.Column(name = "fee_type", nullable = true, insertable = true, updatable = true, length = 8)
    public String getFeeType() {
        return feeType;
    }

    public void setFeeType(String feeType) {
        this.feeType = feeType;
    }

    private Integer cashFee;

    @Basic
    @javax.persistence.Column(name = "cash_fee", nullable = true, insertable = true, updatable = true)
    public Integer getCashFee() {
        return cashFee;
    }

    public void setCashFee(Integer cashFee) {
        this.cashFee = cashFee;
    }

    private String cashFeeType;

    @Basic
    @javax.persistence.Column(name = "cash_fee_type", nullable = true, insertable = true, updatable = true, length = 8)
    public String getCashFeeType() {
        return cashFeeType;
    }

    public void setCashFeeType(String cashFeeType) {
        this.cashFeeType = cashFeeType;
    }

    private Integer couponFee;

    @Basic
    @javax.persistence.Column(name = "coupon_fee", nullable = true, insertable = true, updatable = true)
    public Integer getCouponFee() {
        return couponFee;
    }

    public void setCouponFee(Integer couponFee) {
        this.couponFee = couponFee;
    }

    private String couponCount;

    @Basic
    @javax.persistence.Column(name = "coupon_count", nullable = true, insertable = true, updatable = true, length = 8)
    public String getCouponCount() {
        return couponCount;
    }

    public void setCouponCount(String couponCount) {
        this.couponCount = couponCount;
    }

    private String couponIdN;

    @Basic
    @javax.persistence.Column(name = "coupon_id_$n", nullable = true, insertable = true, updatable = true, length = 25)
    public String getCouponIdN() {
        return couponIdN;
    }

    public void setCouponIdN(String couponIdN) {
        this.couponIdN = couponIdN;
    }

    private Integer couponFeeN;

    @Basic
    @javax.persistence.Column(name = "coupon_fee_$n", nullable = true, insertable = true, updatable = true)
    public Integer getCouponFeeN() {
        return couponFeeN;
    }

    public void setCouponFeeN(Integer couponFeeN) {
        this.couponFeeN = couponFeeN;
    }

    private String transactionId;

    @Basic
    @javax.persistence.Column(name = "transaction_id", nullable = true, insertable = true, updatable = true, length = 32)
    public String getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(String transactionId) {
        this.transactionId = transactionId;
    }

    private String outTradeNo;

    @Basic
    @javax.persistence.Column(name = "out_trade_no", nullable = true, insertable = true, updatable = true, length = 32)
    public String getOutTradeNo() {
        return outTradeNo;
    }

    public void setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
    }

    private String attach;

    @Basic
    @javax.persistence.Column(name = "attach", nullable = true, insertable = true, updatable = true, length = 128)
    public String getAttach() {
        return attach;
    }

    public void setAttach(String attach) {
        this.attach = attach;
    }

    private String timeEnd;

    @Basic
    @javax.persistence.Column(name = "time_end", nullable = true, insertable = true, updatable = true, length = 14)
    public String getTimeEnd() {
        return timeEnd;
    }

    public void setTimeEnd(String timeEnd) {
        this.timeEnd = timeEnd;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TWxpayCallbackEntity that = (TWxpayCallbackEntity) o;

        if (id != that.id) return false;
        if (returnCode != null ? !returnCode.equals(that.returnCode) : that.returnCode != null) return false;
        if (returnMsg != null ? !returnMsg.equals(that.returnMsg) : that.returnMsg != null) return false;
        if (appid != null ? !appid.equals(that.appid) : that.appid != null) return false;
        if (mchId != null ? !mchId.equals(that.mchId) : that.mchId != null) return false;
        if (deviceInfo != null ? !deviceInfo.equals(that.deviceInfo) : that.deviceInfo != null) return false;
        if (nonceStr != null ? !nonceStr.equals(that.nonceStr) : that.nonceStr != null) return false;
        if (sign != null ? !sign.equals(that.sign) : that.sign != null) return false;
        if (resultCode != null ? !resultCode.equals(that.resultCode) : that.resultCode != null) return false;
        if (errCode != null ? !errCode.equals(that.errCode) : that.errCode != null) return false;
        if (errCodeDes != null ? !errCodeDes.equals(that.errCodeDes) : that.errCodeDes != null) return false;
        if (openid != null ? !openid.equals(that.openid) : that.openid != null) return false;
        if (isSubscribe != null ? !isSubscribe.equals(that.isSubscribe) : that.isSubscribe != null) return false;
        if (tradeType != null ? !tradeType.equals(that.tradeType) : that.tradeType != null) return false;
        if (bankType != null ? !bankType.equals(that.bankType) : that.bankType != null) return false;
        if (totalFee != null ? !totalFee.equals(that.totalFee) : that.totalFee != null) return false;
        if (feeType != null ? !feeType.equals(that.feeType) : that.feeType != null) return false;
        if (cashFee != null ? !cashFee.equals(that.cashFee) : that.cashFee != null) return false;
        if (cashFeeType != null ? !cashFeeType.equals(that.cashFeeType) : that.cashFeeType != null) return false;
        if (couponFee != null ? !couponFee.equals(that.couponFee) : that.couponFee != null) return false;
        if (couponCount != null ? !couponCount.equals(that.couponCount) : that.couponCount != null) return false;
        if (couponIdN != null ? !couponIdN.equals(that.couponIdN) : that.couponIdN != null) return false;
        if (couponFeeN != null ? !couponFeeN.equals(that.couponFeeN) : that.couponFeeN != null) return false;
        if (transactionId != null ? !transactionId.equals(that.transactionId) : that.transactionId != null)
            return false;
        if (outTradeNo != null ? !outTradeNo.equals(that.outTradeNo) : that.outTradeNo != null) return false;
        if (attach != null ? !attach.equals(that.attach) : that.attach != null) return false;
        if (timeEnd != null ? !timeEnd.equals(that.timeEnd) : that.timeEnd != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (returnCode != null ? returnCode.hashCode() : 0);
        result = 31 * result + (returnMsg != null ? returnMsg.hashCode() : 0);
        result = 31 * result + (appid != null ? appid.hashCode() : 0);
        result = 31 * result + (mchId != null ? mchId.hashCode() : 0);
        result = 31 * result + (deviceInfo != null ? deviceInfo.hashCode() : 0);
        result = 31 * result + (nonceStr != null ? nonceStr.hashCode() : 0);
        result = 31 * result + (sign != null ? sign.hashCode() : 0);
        result = 31 * result + (resultCode != null ? resultCode.hashCode() : 0);
        result = 31 * result + (errCode != null ? errCode.hashCode() : 0);
        result = 31 * result + (errCodeDes != null ? errCodeDes.hashCode() : 0);
        result = 31 * result + (openid != null ? openid.hashCode() : 0);
        result = 31 * result + (isSubscribe != null ? isSubscribe.hashCode() : 0);
        result = 31 * result + (tradeType != null ? tradeType.hashCode() : 0);
        result = 31 * result + (bankType != null ? bankType.hashCode() : 0);
        result = 31 * result + (totalFee != null ? totalFee.hashCode() : 0);
        result = 31 * result + (feeType != null ? feeType.hashCode() : 0);
        result = 31 * result + (cashFee != null ? cashFee.hashCode() : 0);
        result = 31 * result + (cashFeeType != null ? cashFeeType.hashCode() : 0);
        result = 31 * result + (couponFee != null ? couponFee.hashCode() : 0);
        result = 31 * result + (couponCount != null ? couponCount.hashCode() : 0);
        result = 31 * result + (couponIdN != null ? couponIdN.hashCode() : 0);
        result = 31 * result + (couponFeeN != null ? couponFeeN.hashCode() : 0);
        result = 31 * result + (transactionId != null ? transactionId.hashCode() : 0);
        result = 31 * result + (outTradeNo != null ? outTradeNo.hashCode() : 0);
        result = 31 * result + (attach != null ? attach.hashCode() : 0);
        result = 31 * result + (timeEnd != null ? timeEnd.hashCode() : 0);
        return result;
    }
}
